package com.glela.goods.dao.vo;

import java.util.HashMap;
import java.util.Map;

import org.apache.commons.collections4.MapUtils;

/**
 * 分时抢购商品库存
 * @author zls
 *
 */
public class LimitSaleGoodsInventroy {
	private Map<String, Integer> _data = new HashMap<>();

	public void put(int limitSaleId, long goodsId, int nums) {
		_data.put(limitSaleId + "_" + goodsId, nums);
	}

	/** 可用库存 */
	public int getNums(int limitSaleId, long goodsId) {
		return MapUtils.getIntValue(_data, limitSaleId + "_" + goodsId, 0);
	}

}
